<template>
  <div class="dialog">
    <el-dialog width="45%" title="驳回原因" :visible="true" :close-on-click-modal="false" :before-close="close">
      <el-form ref="form" :model="form" label-width="130px" disabled>
        <el-form-item label="驳回原因：" prop="rejectReason">
          <el-col :span="18">
            <el-input v-model="form.rejectReason" rows="5" type="textarea" placeholder="请输入驳回原因" clearable />
          </el-col>
        </el-form-item>
        <el-form-item label="附件：">
          <el-col :span="18">
            <UploadFile :file-list="form.rejectFileUrl" disabled />
          </el-col>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>

import UploadFile from '@/components/UploadFile/index.vue'

export default {
  name: 'Reject',
  components: {
    UploadFile
  },
  props: {
    rejectForm: {
      type: Object,
      default: () => ({})
    }
  },

  data() {
    return {
      form: {
        rejectReason: '',
        rejectFileUrl: ''
      }
    }
  },

  created() {
    this.form = this.rejectForm
  },

  methods: {

    // 取消
    close() {
      this.$emit('close')
    }
  }

}
</script>

<style lang="scss" scoped></style>
